<extend name="base/index" />

	<block name="content">
		<!-- 页面部分 -->
		<div class="page-content">

			<!-- BEGIN SAMPLE PORTLET CONFIGURATION MODAL FORM-->
			<div id="portlet-config" class="modal hide">
				<div class="modal-header">
					<button data-dismiss="modal" class="close" type="button"></button>
					<h3>portlet Settings</h3>
				</div>
				<div class="modal-body">
					<p>Here will be a configuration form</p>
				</div>
			</div>

			<!-- END SAMPLE PORTLET CONFIGURATION MODAL FORM-->

			<!-- BEGIN PAGE CONTAINER-->        
			<div class="container-fluid">
				<!-- 页面级头部 -->

				<div class="row-fluid">
					<div class="span12">
						<!-- BEGIN PAGE TITLE & BREADCRUMB-->
						<h3 class="page-title">
							用户组管理 <small>用户列表</small>
						</h3>

						<ul class="breadcrumb">
							<li>
								<i class="icon-home"></i>
								<a href="{:U('Admin')}">管理后台</a> 
								<i class="icon-angle-right"></i>
							</li>
							<li>
								<a href="#">用户组列表</a>
								<i class="icon-angle-right"></i>
							</li>
							<li>
								<a href="#">成员列表</a>
								
							</li>
						</ul>
						<!-- END PAGE TITLE & BREADCRUMB-->
					</div>

				</div>
				<!-- END 页面级头部 -->

				<!-- BEGIN PAGE CONTENT-->
				<div class="row-fluid">
					<div class="span12">
						<!-- BEGIN EXAMPLE TABLE PORTLET-->
						<div class="portlet box light-grey">
							<div class="portlet-title">
								<div class="caption"><i class="icon-globe"></i>成员列表</div>
								<div class="tools">
									<a href="javascript:;" class="collapse"></a>
									<a href="#portlet-config" data-toggle="modal" class="config"></a>
									<a href="javascript:;" class="reload"></a>
									<a href="javascript:;" class="remove"></a>
								</div>
							</div>

							<div class="portlet-body">
								<div class="clearfix">
										<input id="group_user_add_btn" class="span3 m-wrap" type="text" placeholder="请输入用户名，例：admin">
										<div class="btn-group">
											<button onClick="group_user_add({$gid})" class="btn green">
											添加 <i class="icon-plus"></i>
											</button>
										</div>
									<div class="btn-group pull-right">
										<button class="btn dropdown-toggle" data-toggle="dropdown">Tools <i class="icon-angle-down"></i>
										</button>
										<ul class="dropdown-menu pull-right">
											<li><a href="#">打印</a></li>
											<li><a href="#">保存</a></li>
											<li><a href="#">导出</a></li>
										</ul>
									</div>
								</div>

								<table class="table table-striped table-bordered table-hover" id="sample_1">
									<thead>
										<tr>
											<!-- <th style="width:40px;"><input type="checkbox" class="group-checkable" data-set="#sample_1 .checkboxes" />ID</th> -->
											<th><input type="checkbox" class="group-checkable" data-set="#sample_1 .checkboxes" />ID</th>
											<th>用户名(昵称)</th>
											<th class="hidden-480">Email</th>
											<th class="hidden-480">QQ</th>
											<th class="hidden-480">登陆次数</th>
											<th ></th>

										</tr>

									</thead>

									<tbody>
								<notempty name="_list">
								<volist name="_list" id="vo">
									<tr class="odd gradeX">
										<td><input type="checkbox" class="checkboxes" value="{$vo.uid}" />{$vo.uid}</td>
										<td>{$vo.nickname}({$vo.username})</td>
										<td class="hidden-480"><a href="mailto:{$vo.email}">{$vo.email}</a></td>
										<td class="hidden-480">{$vo.qq}</td>
										<td class="center hidden-480">{$vo.login}</td>
										<td ><a href="{:U('Admin/Auth/group_user_del')}?uid={$vo.uid}&gid={$gid}"><span class="label .badge-warning">踢出</span></a></td>
									</tr>
									</volist>
									<else/>
									<td colspan="9" class="text-center"> aOh! 暂时还没有内容! </td>
									</notempty>
									</tbody>

								</table>

							</div>

						</div>

						<!-- END EXAMPLE TABLE PORTLET-->

					</div>

				</div>

				<!-- END 页面内容 -->

			</div>
			<!-- END PAGE CONTAINER-->
		</div>
	<!-- 页面部分 -->
	
	<script>
		function group_user_add(gid){
			var username = $("#group_user_add_btn").val();
			if(username == ''){
				alert("用户名不能为空！");
				return;
			}
			
			$.get( CONTROLLER + "/gruop_user_add?gid="+gid+"&username="+username ,
				function(ret){
				alert(ret.info);
				if(ret.status == 1){
					location.reload();
					//刷新页面
				}
			});
		}
		</script>
	</block>

	<block name="script">
		
		<script>
		jQuery(document).ready(function() {    
		   App.init(); 
		});
		</script>
	</block>